package service;


import java.sql.SQLException;
import entity.User;


/**
* Title: IUserService
* Description:
* @author 刘嘉龙
*/
public interface UserService {

	/**
	* Title: register
	* Description: 注册
	* @author: 刘嘉龙
	* @param users
	* @return 注册成功返回null,否则返回报错信息.
	* @throws SQLException
	* @throws Exception
	 */
	public Integer register(User users) throws SQLException, Exception;

	/**
	* Title: login
	* Description: 登录
	* @author: 刘嘉龙
	* @param id
	* @param passward
	* @return 成功返回 User,否则null。
	* @throws Exception
	*/
	public User login(String id,String passward) throws Exception;

	
	/**
	* Title: remove
	* Description: 删除用户
	* @author: 刘嘉龙
	* @param userid
	* @throws SQLException
	 */
	public void remove(String userid) throws SQLException;
	
	/**
	* Title: getUser
	* Description: 获取用户
	* @author:刘嘉龙
	* @param userid
	* @return
	* @throws Exception
	 */
	public User getUser(String userid) throws Exception;
	
	/**
	* Title: update
	* Description:修改用户
	* @author: 刘嘉龙
	* @param u
	* @return
	* @throws Exception
	 */
	boolean update(User u) throws Exception;
	/**
	* Title: updateGrade
	* Description:提升等级
	* @author刘嘉龙
	* @throws Exception
	 */
	public void updateGrade(String email) throws Exception;   
	

}
